package com.lagou.zuoye.service;

import com.lagou.zuoye.bean.Student;
import com.lagou.zuoye.dao.StudentDao;
import com.lagou.zuoye.factory.StudentDaoFactory;

public class StudentService {
    private StudentDao studentDao;
    public StudentService(){
        this.studentDao= StudentDaoFactory.getStudentDao();
    }

    public int StudentAddService(Student student){
        return studentDao.addStudent(student);
    }

    public int StudentDeleteService(String name){
        return studentDao.deleteStudent(name);
    }

    public int StudentAlterService(Student student,String name){
        return studentDao.alterStudent(student,name);
    }

    public Student StudentSelectService(String name){
        return studentDao.selectStudent(name);
    }

}
